﻿using ASmile.DBModel;

namespace ASmile.Win.Forms
{
    public partial class FrmUser_old : FrmCrud<Sys_User>
    {
        private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
        private System.Windows.Forms.ToolStripMenuItem tsMenuRestPwd;
        private System.ComponentModel.IContainer components;

        protected override FrmBaseEdit CreateAddForm()
        {            
            return new FrmUserEdit();
        }

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.tsMenuRestPwd = new System.Windows.Forms.ToolStripMenuItem();
            this.contextMenuStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // dgvPage
            // 
            this.dgvPage.Size = new System.Drawing.Size(910, 42);
            // 
            // contextMenuStrip1
            // 
            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tsMenuRestPwd});
            this.contextMenuStrip1.Name = "contextMenuStrip1";
            this.contextMenuStrip1.Size = new System.Drawing.Size(125, 26);
            // 
            // tsMenuRestPwd
            // 
            this.tsMenuRestPwd.Name = "tsMenuRestPwd";
            this.tsMenuRestPwd.Size = new System.Drawing.Size(124, 22);
            this.tsMenuRestPwd.Text = "重置密码";
            this.tsMenuRestPwd.Click += new System.EventHandler(this.tsMenuRestPwd_Click);
            // 
            // FrmUser
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
            this.ClientSize = new System.Drawing.Size(910, 450);
            this.Margin = new System.Windows.Forms.Padding(2);
            this.Name = "FrmUser";
            this.Load += new System.EventHandler(this.FrmUser_Load);
            this.Controls.SetChildIndex(this.dgvPage, 0);
            this.contextMenuStrip1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void tsMenuRestPwd_Click(object sender, System.EventArgs e)
        {
            var user = dgv.GetSelectedClassData<Sys_User>();
            if (user == null)
            {
                ShowMessage("没有选中用户");
                return;
            }
        }

        private void FrmUser_Load(object sender, System.EventArgs e)
        {
            dgv.ContextMenuStrip = contextMenuStrip1;
        }
    }
}